home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
news
/
readers
/
skim-0.8
/
skim-0
/
skim-0.8.4
/
Makefile
< prev
next >
Wrap
Makefile
|
1996-02-18
|
9KB
|
284 lines
# INSTALLATION
# Type 'make' and follow the step-by-step instructions.
# COPYRIGHT
# Skim - Off-line news reading package optimized for slow lines.
# Copyright (C) 1996 Rene W.J. Pijlman
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# VERSION
# Skim version 0.8.4.
# $Header: /home/rene/sys/CVS_MasterSourceRepository/skim/Makefile,v 1.16 1996/02/18 11:40:19 rene Exp $
ifneq ($(SkimDevelopmentEnvironment),yes)
# Change these parameters to install skim in a different location.
PREFIX=/usr
DOC_PREFIX=/usr/doc
else
PREFIX=$(HOME)
DOC_PREFIX=$(HOME)/doc
endif
# Skim executables will be installed in this directory.
BINDIR = $(PREFIX)/bin
DOCDIR=$(DOC_PREFIX)/skim-0.8.4
README = README
DOCS = $(README) skim.lsm
CC=gcc
RM=rm -f
ifeq ($(SkimDevelopmentEnvironment),yes)
CFLAGS = -Wall -Wstrict-prototypes -Wmissing-prototypes -g -pipe -m486 \
-DDEBUG
else
# Must use -fno-strength-reduce with -O2, to work around a bug in gcc.
CFLAGS = -Wall -Wstrict-prototypes -Wmissing-prototypes \
-O2 -fno-strength-reduce -fomit-frame-pointer -pipe -m486 \
-s -DNDEBUG
endif
BINARIES = ConstructArticle \
GetSubjectsOfNewArticlesInGroup \
PostArticle \
GetListOfGroups \
GetSelectedArticlesInGroup \
Dispatch \
RebuildArticleIndexes
TEST_BINARIES = VarBufTest \
AuthorParseTest \
SetTest \
ArticleTest
SCRIPTS = skim xskim
SKIM_COMMON_OBJECTS = NNTPStream.o SkimUtils.o
BASIC_LIBRARY_OBJECTS = StandardIO.o \
VarBuf.o \
MemAlloc.o \
Set.o
OBSOLETE_INSTALLED_FILES = GetArticlesInGroup \
AutoSelectAndKill \
GetSubjectsInGroup \
SplitArticle \
NewArticle \
ReplyTo \
ListSubscribedNewsGroups
DID_YOU_KNOW = "Did you know..."
# 'all' is the default target in the development environment.
ifneq ($(SkimDevelopmentEnvironment),yes)
intro:
@echo
@echo "Welcome to the installation procedure of skim. Please follow"
@echo "the step-by-step installation instructions."
@echo
@echo "If you have a complete and up-to-date Linux system"
@echo "the default installation of skim should be fine. If the"
@echo "installation fails, you should check the parameters in"
@echo "Makefile. There is more information on the configuration of"
@echo "skim in the $(README)."
@echo
@echo "Start with 'make fresh'."
@echo
endif
all: .depend $(BINARIES) next_is_make_test
fresh: cleanup next_is_depend
clean: cleanup next_is_morespace
cleanup:
$(RM) $(BINARIES) $(TEST_BINARIES) $(OBSOLETE_INSTALLED_FILES) \
*.o core *.tgz .depend tags
next_is_morespace:
ifneq ($(SkimDevelopmentEnvironment),yes)
@echo
@echo $(DID_YOU_KNOW)
@echo
@echo "You can save even more disk space by removing this source"
@echo "directory (rm -rf `pwd`)."
@echo
@echo "You can keep /usr/src/skim-0.8.4.tgz in case you need"
@echo "to reinstall skim later on."
@echo
@echo "Please read the README in $(DOCDIR)/$(README) for more"
@echo "information on how to configure skim and how to get started."
@echo
endif
# Remove old stuff from previous versions. Install new version.
install: .depend $(BINARIES)
( cd $(BINDIR); $(RM) $(OBSOLETE_INSTALLED_FILES) )
install -dm 755 $(BINDIR)
install -m 755 $(SCRIPTS) $(BINARIES) $(BINDIR)
install -dm 755 $(DOCDIR)
install -m 644 $(DOCS) $(DOCDIR)
ifneq ($(SkimDevelopmentEnvironment),yes)
@echo
@echo $(DID_YOU_KNOW)
@echo
@echo "Skim is now installed. Please read the README in"
@echo "$(DOCDIR)/$(README) for more information on"
@echo "how to configure skim and how to get started."
@echo
@echo "You can save some disk space by typing 'make clean' now."
@echo
endif
uninstall:
( cd $(BINDIR); $(RM) $(SCRIPTS) \
$(BINARIES) \
$(OBSOLETE_INSTALLED_FILES) )
$(RM) -r $(DOCDIR)
VarBufTest: VarBufTest.o $(BASIC_LIBRARY_OBJECTS)
$(CC) $(CFLAGS) -o $@ VarBufTest.o $(BASIC_LIBRARY_OBJECTS)
SetTest: SetTest.o $(BASIC_LIBRARY_OBJECTS)
$(CC) $(CFLAGS) -o $@ SetTest.o $(BASIC_LIBRARY_OBJECTS)
ArticleTest: ArticleTest.o $(BASIC_LIBRARY_OBJECTS) Article.o
$(CC) $(CFLAGS) -o $@ ArticleTest.o Article.o\
$(BASIC_LIBRARY_OBJECTS)
AuthorParseTest: AuthorParseTest.o SkimUtils.o \
$(BASIC_LIBRARY_OBJECTS)
$(CC) $(CFLAGS) -o $@ AuthorParseTest.o \
SkimUtils.o \
$(BASIC_LIBRARY_OBJECTS)
ConstructArticle: ConstructArticle.o Article.o \
$(SKIM_COMMON_OBJECTS) $(BASIC_LIBRARY_OBJECTS)
$(CC) $(CFLAGS) -o $@ ConstructArticle.o Article.o \
$(SKIM_COMMON_OBJECTS) $(BASIC_LIBRARY_OBJECTS)
GetSubjectsOfNewArticlesInGroup: GetSubjectsOfNewArticlesInGroup.o \
AutoSelectAndKill.o \
ArticleNumber.o \
$(BASIC_LIBRARY_OBJECTS) \
$(SKIM_COMMON_OBJECTS)
$(CC) $(CFLAGS) -o $@ GetSubjectsOfNewArticlesInGroup.o \
AutoSelectAndKill.o \
ArticleNumber.o \
$(BASIC_LIBRARY_OBJECTS) $(SKIM_COMMON_OBJECTS)
GetListOfGroups: GetListOfGroups.o NNTPStream.o $(BASIC_LIBRARY_OBJECTS)
$(CC) $(CFLAGS) -o $@ GetListOfGroups.o NNTPStream.o $(BASIC_LIBRARY_OBJECTS)
GetSelectedArticlesInGroup: GetSelectedArticlesInGroup.o \
$(SKIM_COMMON_OBJECTS) $(BASIC_LIBRARY_OBJECTS) \
ArticleIndex.o Article.o
$(CC) $(CFLAGS) -o $@ GetSelectedArticlesInGroup.o \
$(SKIM_COMMON_OBJECTS) $(BASIC_LIBRARY_OBJECTS) \
ArticleIndex.o Article.o
RebuildArticleIndexes: RebuildArticleIndexes.o \
$(SKIM_COMMON_OBJECTS) $(BASIC_LIBRARY_OBJECTS) \
ArticleIndex.o Article.o
$(CC) $(CFLAGS) -o $@ RebuildArticleIndexes.o \
$(SKIM_COMMON_OBJECTS) $(BASIC_LIBRARY_OBJECTS) \
ArticleIndex.o Article.o
PostArticle: PostArticle.o $(SKIM_COMMON_OBJECTS) Article.o \
$(BASIC_LIBRARY_OBJECTS)
$(CC) $(CFLAGS) -o $@ PostArticle.o $(SKIM_COMMON_OBJECTS) \
Article.o $(BASIC_LIBRARY_OBJECTS)
Dispatch: Dispatch.o SkimUtils.o $(BASIC_LIBRARY_OBJECTS)
$(CC) $(CFLAGS) -o $@ Dispatch.o SkimUtils.o $(BASIC_LIBRARY_OBJECTS)
test: .depend $(TEST_BINARIES)
@echo -n "VarBufTest: "
@VarBufTest
@echo -n "SetTest: "
@SetTest
@echo -n "ArticleTest: "
@ArticleTest
@echo -n "AuthorParseTest: "
@AuthorParseTest
ifneq ($(SkimDevelopmentEnvironment),yes)
@echo
@echo $(DID_YOU_KNOW)
@echo
@echo "You should now do 'make install'. This will remove the"
@echo "executables from old versions of skim, install the new"
@echo "executables in $(BINDIR) and install the $(README)"
@echo "in $(DOCDIR)."
@echo
endif
next_is_make_test:
ifneq ($(SkimDevelopmentEnvironment),yes)
@echo
@echo $(DID_YOU_KNOW)
@echo
@echo "You can do 'make test' to run a couple of builtin diagnostics."
@echo
@echo "Then you should do 'make install'. This will remove the"
@echo "executables from old versions of skim, install the new"
@echo "executables in $(BINDIR) and install the $(README)"
@echo "in $(DOCDIR)."
@echo
endif
.depend:
ifneq ($(SkimDevelopmentEnvironment),yes)
@echo
@echo $(DID_YOU_KNOW)
@echo
@echo First do 'make depend'.
@echo
@exit 1
endif
next_is_depend:
ifneq ($(SkimDevelopmentEnvironment),yes)
@echo
@echo $(DID_YOU_KNOW)
@echo
@echo "The next step is 'make depend'."
@echo
endif
# Just an alias.
dep: depend
# Put include file dependencies in a file.
depend:
$(CPP) -M *.c > .depend
ifneq ($(SkimDevelopmentEnvironment),yes)
@echo
@echo $(DID_YOU_KNOW)
@echo
@echo "The next step is 'make all'."
@echo
endif
# Make tags file for vi.
tags: FORCE
ctags --defines --ignore-indentation --typedefs --no-warn *.[ch]
FORCE:
# include a dependency file if one exists
ifeq (.depend,$(wildcard .depend))
include .depend
endif